A well system (e.g., an oil or gas well for extracting fluid or gas from a subterranean formation) can include various well tools in a wellbore. It can be desirable to communicate data between the well tools. In some examples, a cable can be used to transmit data between the well tools. The cable can wear or fail, however, as the well components rotate and vibrate to perform functions in the wellbore. In other examples, the well tools can wirelessly transmit data to each other. The power transmission efficiency of a wireless communication, however, can depend on a variety of factors that may be impractical or infeasible to control. For example, the power transmission efficiency of a wireless communication can depend on the conductive characteristics of the subterranean formation. It can be challenging to wirelessly communicate between well tools efficiently.